//将两个升序链表合并为一个新的 升序 链表并返回
//新链表是通过拼接给定的两个链表的所有节点组成的。
//list1  和list2 依次比较  取小的尾插
#include<stdio.h>
#include<stdlib.h>


struct ListNode
{
	int val;
	struct ListNode* next;
};

void SLTNodePrintf(struct ListNode* ps)
{
	struct ListNode* cur = ps;
	while (cur)
	{
		printf("%d->", cur->val);
		cur = cur->next;
	}
	printf("NULL\n");
}


struct ListNode* mergeTwoLists(struct ListNode* list1, struct ListNode* list2) {

}



int main()
{
	struct ListNode* n1 = malloc(sizeof(struct ListNode));
	struct ListNode* n2 = malloc(sizeof(struct ListNode));
	struct ListNode* n3 = malloc(sizeof(struct ListNode));
	struct ListNode* n4 = malloc(sizeof(struct ListNode));
	struct ListNode* n5 = malloc(sizeof(struct ListNode));
	struct ListNode* n6 = malloc(sizeof(struct ListNode));

	n1->val = 1;
	n2->val = 2;
	n3->val = 4;

	n4->val = 1;
	n4->val = 3;
	n4->val = 4;

	n1->next = n2;
	n2->next = n3;
	n3->next = NULL;

	n4->next = n5;
	n6->next = n6;
	n6->next = NULL;
	SLTNodePrintf(n1);

	struct ListNode* newnode = mergeTwoLists(n1,n4);
	SLTNodePrintf(newnode);

	return 0;
}